import pandas as pd
import json

# Reading the Excel file
df = pd.read_excel('工序标注.xlsx', sheet_name='Sheet1')

# Converting the dataframe to a list of dictionaries
data = df.to_dict(orient='records')

# Writing to JSON file
with open('label.json', 'w', encoding='utf-8') as f:
    json.dump(data, f, ensure_ascii=False, indent=4)